import { Field, Int, ObjectType } from "@nestjs/graphql";
import { Work } from "@prisma/client";
import { MediaEntity } from "src/media/media.entity";



@ObjectType()
export class WorkEntity implements Work {
    @Field(() => Int)
    id: number;

    @Field()
    createAt: Date;

    @Field()
    updateAt: Date;

    @Field()
    name: string;

    @Field()
    deadline: Date;

    @Field(() => [MediaEntity], { nullable: true })
    media: MediaEntity[]
}